﻿using System;
using YJKRevitCode.RevitObjectCompareUtility;
using System.Collections.Generic;
using Autodesk.Revit.DB;


namespace YJKArchMethodLibrary.Utils.Generics
{
    public class XYZEqualityComparer : IEqualityComparer<XYZ>
	{
        //public void SetPrecision(uint input)
        //{
        //    this.m_useDoubleEqualityComparer.SetPrecision(input);
        //}

        public bool Equals(XYZ p, XYZ q)
        {
            return p.IsAlmostEqualTo(q);
        }

        public int GetHashCode(XYZ p)
        {
            //string doubleString = this.m_useDoubleEqualityComparer.GetDoubleString(p.X);
            //string doubleString2 = this.m_useDoubleEqualityComparer.GetDoubleString(p.Y);
            //string doubleString3 = this.m_useDoubleEqualityComparer.GetDoubleString(p.Z);
            //return string.Concat(new string[]
            //{
            //    "(",
            //    doubleString,
            //    ",",
            //    doubleString2,
            //    ",",
            //    doubleString3,
            //    ")"
            //}).GetHashCode();

            return 0;
        }

        //private DoubleEqualityComparer m_useDoubleEqualityComparer = new DoubleEqualityComparer();
	}
}
